/*
** main.c for test in /home/hubert_s//test/list_C
** 
** Made by sevan hubert
** Login   <hubert_s@epitech.net>
** 
** Started on  Tue Feb  8 16:10:58 2011 sevan hubert
** Last update Tue Feb  8 17:30:11 2011 sevan hubert
*/

#include "list.h"
#include "item.h"
#include <stdio.h>
#include <string.h>

int	main()
{
  char	*str1 = strdup("Kouin");
  char	*str2 = strdup("Pouet");
  char	*str3 = strdup("Plop");
  item	*item1 = alloc_list_item();
  item	*item2 = alloc_list_item();
  item	*item3 = alloc_list_item();
  t_list *list = alloc_list();

  init_list_item(item1, str1, (strlen(str1) + 1) * sizeof(*str1));
  init_list_item(item2, str2, (strlen(str2) + 1) * sizeof(*str2));
  init_list_item(item3, str3, (strlen(str3) + 1) * sizeof(*str3));
  init_list(list);
  put_begin_list(list, item1);
  put_end_list(list, item2);
  put_begin_list(list, item3);
  printf("%s\n%s\n%s\n", (char *)list->begin->object, (char *)list->begin->next->object, (char *)list->end->object);
  return (0);
}
